package com.order.domain.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 小杰大人
 * @since 2025-02-23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("course")
@ApiModel(value = "Courses对象", description = "课程基本信息表")
@Builder
public class Course implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id")
    private Long id;

    @ApiModelProperty("课程分类id")
    @TableField("category_id")
    private Long categoryId;

    @ApiModelProperty("课程预览视频id")
    @TableField("video_id")
    private Long videoId;

    @ApiModelProperty("课程预览图片id集合 多个之间逗号分割")
    @TableField("image_ids")
    private String imageIds;

    @ApiModelProperty("课程封面id")
    @TableField("cover_id")
    private Long coverId;

    @ApiModelProperty("发布者id")
    @TableField("user_id")
    private Long userid;

    @ApiModelProperty("课程名")
    @TableField("name")
    private String name;

    @ApiModelProperty("课程状态 1：正常，2：下架")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("课程详情信息 富文本")
    @TableField("detail")
    private String detail;

    @ApiModelProperty("课程原始价格")
    @TableField("ori_price")
    private BigDecimal oriPrice;

    @ApiModelProperty("促销折扣")
    @TableField("discount")
    private BigDecimal discount;

    @ApiModelProperty("课程当前价格")
    @TableField("cur_price")
    private BigDecimal curPrice;

    @ApiModelProperty("评分")
    @TableField("score")
    private BigDecimal score;

    @ApiModelProperty("0:免费, 1:收费")
    @TableField("type")
    private Integer type;

    @ApiModelProperty("常见问题")
    @TableField("question")
    private String question;

    @ApiModelProperty("课程描述")
    @TableField("description")
    private String description;

    @ApiModelProperty("课程标签Id集合，多个之间逗号分割")
    @TableField("tag_ids")
    private String tagIds;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time" , fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time" , fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("创建人")
    @TableField(value = "create_user" , fill = FieldFill.INSERT)
    private Long createUser;

    @ApiModelProperty("修改人")
    @TableField(value = "update_user" , fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

    @ApiModelProperty("课程点赞数")
    @TableField("likes")
    private Integer likes;

    @ApiModelProperty("课程收藏数")
    @TableField("favorite")
    private Integer favorite;

    @ApiModelProperty("课程版本号")
    @TableField("version")
    private String version;

    @ApiModelProperty("课程销量")
    @TableField("sales")
    private Long sales;

    @ApiModelProperty("是否删除 0:否 1:是")
    @TableField("deleted")
    private Byte deleted;

}
